package com.ht.service.impl;

import com.ht.bean.Emp;
import com.ht.bean.Holiday;
import com.ht.dao.HolidayDao;
import com.ht.service.HolidayService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class HolidayServiceImpl implements HolidayService {
    /*
     *请假表实体类
     * @param
     * @return
     **/

    @Autowired
    private HolidayDao holidayDao;


    @Override
    public boolean addApplay(Holiday holiday) {
        return holidayDao.addApplay(holiday);
    }

    @Override
    public List<Holiday> selHoliday(String empId) {
        return holidayDao.selHoliday(empId);
    }

    @Override
    public Holiday findObjById(Integer holidayId) {
        return holidayDao.findObjById(holidayId);
    }

    @Override
    public boolean updHoliday(Holiday holiday) {
        return holidayDao.updHoliday(holiday);
    }

    @Override
    public String selectempName(String empId) {
        return holidayDao.selectempName(empId);
    }

    @Override
    public String selectempName2() {
        return holidayDao.selectempName2();
    }


    @Override
    public List<Map> selectHoliday(Integer startIndex,Integer pageSize,Emp emp,Holiday holiday) {
        return holidayDao.selectHoliday(startIndex,pageSize,emp,holiday);
    }


    @Override
    public int countEmp(Emp emp, Holiday holiday) {
        return holidayDao.countEmp(emp,holiday);
    }

    @Override
    public List<Emp> empList() {
        return holidayDao.empList();
    }

    /*
     *删除员工请假信息
     * @param holidayId
     * @return holidayId
     **/
    @Override
    public boolean deleteHolidayId(Integer holidayId) {
        return holidayDao.deleteHolidayId(holidayId);
    }

    @Override
    public List<Map> LookHolidayContent(Integer holidayId) {
        return holidayDao.LookHolidayContent(holidayId);
    }
}
